home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / futils.arc / FMISC.DOC < prev    next >
Text File  |  1991-04-28  |  2KB  |  68 lines

  1.  
  2. ********************************************************************
  3. ************************* FMISC by Rex Kerr ************************
  4. ************************ Copyright (C) 1989 ************************
  5. ********************************************************************
  6.  
  7. This is a tiny unit written in assembly languge.  There are just
  8. 5 procedures in it.
  9.  
  10. ***
  11.  
  12. Qmove(var source,dest; len : word);
  13.  
  14. This works just like the Move procedure in standard TP, except it
  15. is about twice as fast.
  16.  
  17. ***
  18.  
  19. Qfill(fillw : word; var dest: len : word);
  20.  
  21. This works like the FillChar procedure in TP, except it fills words
  22. instead of bytes.  Len is the number of bytes to fill. If the length
  23. is odd, it will be cut one byte short.
  24.  
  25. ***
  26.  
  27. Qfillchar(var dest; len : word; fillc : byte);
  28.  
  29. This works just like the FillChar procedure in TP, except it is
  30. about twice as fast.
  31.  
  32. ***
  33.  
  34. QAscToStr(var Asc; var st : string);
  35.  
  36. This converts a null-terminated string into a Pascal string.
  37.  
  38. The first character in a Pascal string contains the length of the
  39. string.  A null-terminated string ends with the null character (#0),
  40. and has nothing extra at the start.  Pascal strings are easier to
  41. use, and all of the functions and procedures in Turbo Pascal are for
  42. Pascal strings.  The only advantage of null-terminated strings is
  43. that they are not limited to 255 characters.
  44.  
  45. ***
  46.  
  47. QStrToAsc(var st : string; var Asc);
  48.  
  49. This converts a pascal string into a null-terminated string.
  50. Here is a short example:
  51.  
  52. type nullstring = array[1..1000] of char;
  53. var st : string;
  54.     nst : nullstring;
  55. begin
  56.      st := 'Have a nice day!'
  57.      qstrtoasc(st,nst);
  58.      { Nst = 'Have a nice day'#0 }
  59.      . . .   { Do something that puts 'Thank you' in nst }
  60.      qasctostr(nst,st);
  61.      write(st);  { This writes 'Thank you' }
  62. end.
  63.  
  64. ***
  65.  
  66. That's it.
  67.  
  68.